home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / CoreGateway / StaticRecipient.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  2.8 KB  |  94 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        StaticRecipient.h
  3.  
  4.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Part of the AOCE Sample SMSAM Package.  Consult the license
  8.     which came with this software for your specific legal rights.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __STATICRECIPIENT__
  15. #define __STATICRECIPIENT__
  16.  
  17. #ifndef __RECIPIENT__
  18. #include "Recipient.h"
  19. #endif
  20.  
  21. #ifndef    __OCEOBJECTS__
  22. #include "OCEObjects.h"
  23. #endif
  24.  
  25. #pragma push
  26. #pragma segment StaticRecipient
  27.  
  28. /***********************************|****************************************/
  29.  
  30. class TStaticRecipient : public TRecipient 
  31. {
  32. public:        TStaticRecipient ( 
  33.                 const TRString& name, 
  34.                 RecipientTypeSet type, 
  35.                 RecipientStatusSet status = cUnknown, 
  36.                 OSType addressType = '\?\?\?\?',
  37.                 const void* data = nil, 
  38.                 unsigned long length = 0 );
  39.  
  40.             TStaticRecipient ( const TRecipient* copied );
  41.  
  42.     virtual ~TStaticRecipient();
  43.  
  44.     //    Recipient Name/Type or CID Methods
  45.     //    ==================================
  46.     virtual Boolean                 GetRecipientName (TRString& ) const;
  47.     virtual Boolean                 GetRecipientType (TRString& ) const;
  48.     virtual Boolean                 GetCID (CreationID& cid) const;
  49.  
  50.     //    Path Information
  51.     //    ================
  52.     virtual Boolean                    IsPathInfoPresent () const = 0;    //    return true if the recipient has any path information
  53.     virtual Boolean                    IsPathInfoOptional () const = 0; // return true if the path info is present but not required
  54.  
  55.     virtual Boolean                 GetPathDNode (unsigned long& dNode) const; // return true if recipient has dNode, false otherwise
  56.  
  57.     virtual unsigned short             GetPathNameCount () const; // return the number of path name items
  58.     virtual void                     GetPathNameItem (unsigned short item, TRString& nodeName) const; // get item-th (one based) pathname, return true if available.
  59.  
  60.     virtual Boolean                 GetDirectoryName (DirectoryName& ) const;
  61.  
  62.     //    Recipient Extension Data
  63.     //    ======================
  64.     virtual Boolean                    IsAddressTypePresent () const = 0;    // return true if an address type is present
  65.     virtual OSType                     GetAddressType () const;
  66.     virtual unsigned long             GetExtensionDataSize () const;
  67.     virtual void                     GetExtensionData ( unsigned long offset, void *buffer, unsigned long bufferSize ) const;
  68.  
  69.     //    Recpient Status
  70.     //    ===============
  71.     virtual Boolean                 GetResponsible () const = 0; // return true if this recipient must be delivered to, false otherwise
  72.     virtual Boolean                 SetStatus ( RecipientStatusSet );
  73.     virtual RecipientStatusSet         GetStatus () const;
  74.  
  75.     
  76. protected:    TStaticRecipient ( const TStaticRecipient& );
  77.             TStaticRecipient&        operator = ( const TStaticRecipient& );
  78.             
  79.             TRString                fName;
  80.             TRString                fType;
  81.             
  82.             RecipientStatusSet        fStatus;
  83.             CreationID                fID;
  84.             OSType                    fAddressType;
  85.             void*                    fData;
  86.             unsigned long            fLength;
  87. };
  88.  
  89. /***********************************|****************************************/
  90.  
  91. #pragma pop
  92.  
  93. #endif    // __STATICRECIPIENT__
  94.